/**
 * jims
 */
package com.jims.master.modules.drug.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jims.master.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 药品价格记录Entity
 * @author CTQ
 * @version 2017-03-02
 */
public class DrugPriceLog extends DataEntity<DrugPriceLog> {
	
	private static final long serialVersionUID = 1L;
	private String drugInfo;		// 药品信息ID
	private String durgPriceId;		// 药品价格ID
	private String priceId;		// 价表ID
    private String packageSpec;  //包装规格
	private String units;		// 药品单位
	private Double tradePrice;		// 市场批发价
	private Double retailPrice;		// 市场零售价
	private Date startDate;		// 起用日期
	private Date stopDate;		// 停止日期
	private String classOnRcpt;		// 费用分类
	private String classOnReckoning;		// 核算项目分类
	private String medicalInsuranceType; //医保类型
	private String subjCode;		// 会计科目
	private String classOnMr;		// 病案首页分类
	private Double priceMax;		// 最高限价
	private String isNew;//是否是最新价格

	
	public DrugPriceLog() {
		super();
	}

	public DrugPriceLog(String id){
		super(id);
	}

	public String getMedicalInsuranceType() {
		return medicalInsuranceType;
	}

	public void setMedicalInsuranceType(String medicalInsuranceType) {
		this.medicalInsuranceType = medicalInsuranceType;
	}

	@Length(min=1, max=64, message="药品信息ID长度必须介于 1 和 64 之间")
	public String getDrugInfo() {
		return drugInfo;
	}

	public void setDrugInfo(String drugInfo) {
		this.drugInfo = drugInfo;
	}
	
	@Length(min=1, max=64, message="药品价格ID长度必须介于 1 和 64 之间")
	public String getDurgPriceId() {
		return durgPriceId;
	}

	public void setDurgPriceId(String durgPriceId) {
		this.durgPriceId = durgPriceId;
	}
	
	@Length(min=1, max=64, message="价表ID长度必须介于 1 和 64 之间")
	public String getPriceId() {
		return priceId;
	}

	public void setPriceId(String priceId) {
		this.priceId = priceId;
	}

    public String getPackageSpec() {
        return packageSpec;
    }

    public void setPackageSpec(String packageSpec) {
        this.packageSpec = packageSpec;
    }

    @Length(min=1, max=2, message="药品单位长度必须介于 1 和 2 之间")
	public String getUnits() {
		return units;
	}

	public void setUnits(String units) {
		this.units = units;
	}

	public Double getTradePrice() {
		return tradePrice;
	}

	public void setTradePrice(Double tradePrice) {
		this.tradePrice = tradePrice;
	}

	public Double getRetailPrice() {
		return retailPrice;
	}

	public void setRetailPrice(Double retailPrice) {
		this.retailPrice = retailPrice;
	}

	public Double getPriceMax() {
		return priceMax;
	}

	public void setPriceMax(Double priceMax) {
		this.priceMax = priceMax;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="起用日期不能为空")
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getStopDate() {
		return stopDate;
	}

	public void setStopDate(Date stopDate) {
		this.stopDate = stopDate;
	}
	
	@Length(min=1, max=10, message="费用分类长度必须介于 1 和 10 之间")
	public String getClassOnRcpt() {
		return classOnRcpt;
	}

	public void setClassOnRcpt(String classOnRcpt) {
		this.classOnRcpt = classOnRcpt;
	}
	
	@Length(min=1, max=10, message="核算项目分类长度必须介于 1 和 10 之间")
	public String getClassOnReckoning() {
		return classOnReckoning;
	}

	public void setClassOnReckoning(String classOnReckoning) {
		this.classOnReckoning = classOnReckoning;
	}
	
	@Length(min=1, max=10, message="会计科目长度必须介于 1 和 10 之间")
	public String getSubjCode() {
		return subjCode;
	}

	public void setSubjCode(String subjCode) {
		this.subjCode = subjCode;
	}
	
	@Length(min=1, max=10, message="病案首页分类长度必须介于 1 和 10 之间")
	public String getClassOnMr() {
		return classOnMr;
	}

	public void setClassOnMr(String classOnMr) {
		this.classOnMr = classOnMr;
	}

	public String getIsNew() {
		return isNew;
	}

	public void setIsNew(String isNew) {
		this.isNew = isNew;
	}
}